#ifndef CANNON_BULLET_H
#define CANNON_BULLET_H

#include "consts.h"
#include "collisia_control.h"

class CANNON_BULLET : public QGraphicsObject
{
    Q_OBJECT
private:
    COLLISIA_CONTROL *collisia_control;
    QPainterPath *border;

    int speed;

    QPixmap *pix;

public:
    int point;
    CASH *cash;

public:
    CANNON_BULLET(QPointF start_point, QTimeLine *global_tl, SCENE *scene,CASH *cash);
    ~CANNON_BULLET();

    QRectF boundingRect() const;
    QPainterPath shape() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);

    int type() const;

public slots:
    void slot_run();
    void Damage_Detected(QPointF a,int d);
    void set_shape();

};

#endif // CANNON_BULLET_H
